import java.util.Scanner;

public class Work1.5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入第一个数: ");
        double num1 = scanner.nextDouble();
        System.out.print("请输入第二个数: ");
        double num2 = scanner.nextDouble();
        System.out.print("请输入第三个数: ");
        double num3 = scanner.nextDouble();
        // 使用简单的排序算法对这三个数进行排序
        double temp;
        if (num1 > num2) {
            temp = num1;
            num1 = num2;
            num2 = temp;
        }
        if (num1 > num3) {
            temp = num1;
            num1 = num3;
            num3 = temp;
        }
        if (num2 > num3) {
            temp = num2;
            num2 = num3;
            num3 = temp;
        }

        // 输出排序后的结果
        System.out.println("从小到大排序的结果是: " + num1 + ", " + num2 + ", " + num3);
        scanner.close();
    }
}
